{
	"info": {
		"_postman_id": "02b3b696-d51d-4750-b4dc-35e6712fd023",
		"name": "Sprint 17 ShareIt (add-docker)",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "2036415"
	},
	"item": [
		{
			"name": "users",
			"item": [
				{
					"name": "User create",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200,201]);",
									"});",
									"pm.test(\"Test create user\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.email, '\"email\" field').to.eql('user@user.com');",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('user');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"user\",\n    \"email\": \"user@user.com\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/users",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "User create duplicate email",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 409\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([409, 500]);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"user\",\n    \"email\": \"user@user.com\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/users",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "User create fail no email",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"user\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/users",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "User create fail invalid email",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"user\",\n    \"email\": \"user.com\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/users",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "User update",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test update user\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.email, '\"email\" field').to.eql('update@user.com');",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('update');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"update\",\n    \"email\": \"update@user.com\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/users/:userId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users",
								":userId"
							],
							"variable": [
								{
									"key": "userId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "User create",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200,201]);",
									"});",
									"pm.test(\"Test create user\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(3);",
									"    pm.expect(jsonData.email, '\"email\" field').to.eql('user@user.com');",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('user');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"user\",\n    \"email\": \"user@user.com\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/users",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "User name update",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test update user\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.email, '\"email\" field').to.eql('update@user.com');",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('updateName');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"updateName\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/users/:userId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users",
								":userId"
							],
							"variable": [
								{
									"key": "userId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "User name update email",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test update user\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.email, '\"email\" field').to.eql('updateName@user.com');",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('updateName');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"updateName@user.com\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/users/:userId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users",
								":userId"
							],
							"variable": [
								{
									"key": "userId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "User name update email exists",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 409\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([409, 500]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"user@user.com\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/users/:userId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users",
								":userId"
							],
							"variable": [
								{
									"key": "userId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "User get updated",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get user\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.email, '\"email\" field').to.eql('updateName@user.com');",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('updateName');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/users/:userId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users",
								":userId"
							],
							"variable": [
								{
									"key": "userId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "User get",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get user\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(3);",
									"    pm.expect(jsonData.email, '\"email\" field').to.eql('user@user.com');",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('user');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/users/:userId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users",
								":userId"
							],
							"variable": [
								{
									"key": "userId",
									"value": "3"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "User get unkonwn",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 404\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([404]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/users/:userId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users",
								":userId"
							],
							"variable": [
								{
									"key": "userId",
									"value": "100"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "User delete",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/users/:userId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users",
								":userId"
							],
							"variable": [
								{
									"key": "userId",
									"value": "3"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "User create after delete",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200,201]);",
									"});",
									"pm.test(\"Test create user\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(4);",
									"    pm.expect(jsonData.email, '\"email\" field').to.eql('user@user.com');",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('user');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"user\",\n    \"email\": \"user@user.com\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/users",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "User get all",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all user\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'users count in total').to.eql(2);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].email, 'result[0]: \"email\" field').to.eql('updateName@user.com');",
									"    pm.expect(jsonData[0].name, 'result[0]: \"name\" field').to.eql('updateName');",
									"",
									"    pm.expect(jsonData[1].id, 'result[1]: \"id\" field').to.eql(4);",
									"    pm.expect(jsonData[1].email, 'result[1]: \"email\" field').to.eql('user@user.com');",
									"    pm.expect(jsonData[1].name, 'result[1]: \"name\" field').to.eql('user');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/users",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "items",
			"item": [
				{
					"name": "Item create",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200,201]);",
									"});",
									"pm.test(\"Test create item\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Дрель');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Простая дрель');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Дрель\",\n    \"description\": \"Простая дрель\",\n    \"available\": true\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "Item create without X-Sharer-User-Id",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 500\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500, 400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text",
								"disabled": true
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Дрель\",\n    \"description\": \"Простая дрель\",\n    \"available\": true\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "Item create failed by wrong userId",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 500\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,404]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "10",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Дрель\",\n    \"description\": \"Простая дрель\",\n    \"available\": true\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "Item create without available",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Отвертка\",\n    \"description\": \"Аккумуляторная отвертка\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "Item create with empty name",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"\",\n    \"description\": \"Аккумуляторная отвертка\",\n    \"available\": true\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "Item create with empty description",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Отвертка\",\n    \"available\": true\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "item update",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200,201]);",
									"});",
									"pm.test(\"Test update item\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Дрель+');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная дрель');",
									"    pm.expect(jsonData.available, '\"available\" field').to.false;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"id\": 1,\n    \"name\": \"Дрель+\",\n    \"description\": \"Аккумуляторная дрель\",\n    \"available\": false\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "item update without  X-Sharer-User-Id",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 500\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500, 400]);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text",
								"disabled": true
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"id\": 1,\n    \"name\": \"Дрель\",\n    \"description\": \"Простая дрель\",\n    \"available\": false\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "item update with other user",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 404\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([404, 403]);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Дрель\",\n    \"description\": \"Простая дрель\",\n    \"available\": false\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "item update available",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test update available\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Дрель+');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная дрель');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"available\": true\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "item update description",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test update description\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Дрель+');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная дрель + аккумулятор');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n   \"description\": \"Аккумуляторная дрель + аккумулятор\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "item update name",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test update available\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Аккумуляторная дрель');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная дрель + аккумулятор');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n   \"name\": \"Аккумуляторная дрель\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item get",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get item\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Аккумуляторная дрель');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная дрель + аккумулятор');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item get from other user",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get item\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Аккумуляторная дрель');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная дрель + аккумулятор');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item get unknown",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 404\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([404]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "100"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item 2 create",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
									"});",
									"pm.test(\"Test create item\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Отвертка');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная отвертка');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Отвертка\",\n    \"description\": \"Аккумуляторная отвертка\",\n    \"available\": true\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "Item 3 create",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
									"});",
									"pm.test(\"Test create item\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(3);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Клей Момент');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Тюбик суперклея марки Момент');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Клей Момент\",\n    \"description\": \"Тюбик суперклея марки Момент\",\n    \"available\": true\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "Item get all",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'items count in total').to.eql(1);",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].name, 'result[0]: \"name\" field').to.eql('Аккумуляторная дрель');",
									"    pm.expect(jsonData[0].description, 'result[0]: \"description\" field').to.eql('Аккумуляторная дрель + аккумулятор');",
									"    pm.expect(jsonData[0].available, 'result[0]: \"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "Item get all user 4",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'items count in total').to.eql(2);",
									"    ",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].name, 'result[0]: \"name\" field').to.eql('Отвертка');",
									"    pm.expect(jsonData[0].description, 'result[0]: \"description\" field').to.eql('Аккумуляторная отвертка');",
									"    pm.expect(jsonData[0].available, 'result[0]: \"available\" field').to.true;",
									"",
									"    pm.expect(jsonData[1].id, 'result[1]: \"id\" field').to.eql(3);",
									"    pm.expect(jsonData[1].name, 'result[1]: \"name\" field').to.eql('Клей Момент');",
									"    pm.expect(jsonData[1].description, 'result[1]: \"description\" field').to.eql('Тюбик суперклея марки Момент');",
									"    pm.expect(jsonData[1].available, 'result[1]: \"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "Item search аккумуляторная",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test search Аккумуляторная\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'items count in total').to.eql(2);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].name, 'result[0]: \"name\" field').to.eql('Аккумуляторная дрель');",
									"    pm.expect(jsonData[0].description, 'result[0]: \"description\" field').to.eql('Аккумуляторная дрель + аккумулятор');",
									"    pm.expect(jsonData[0].available, 'result[0]: \"available\" field').to.true;",
									"",
									"    pm.expect(jsonData[1].id, 'result[1]: \"id\" field').to.eql(2);",
									"    pm.expect(jsonData[1].name, 'result[1]: \"name\" field').to.eql('Отвертка');",
									"    pm.expect(jsonData[1].description, 'result[1]: \"description\" field').to.eql('Аккумуляторная отвертка');",
									"    pm.expect(jsonData[1].available, 'result[1]: \"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/search?text=аккУМУляторная",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								"search"
							],
							"query": [
								{
									"key": "text",
									"value": "аккУМУляторная"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "item update set unavailable",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test update available\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Отвертка');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная отвертка');",
									"    pm.expect(jsonData.available, '\"available\" field').to.false;",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"available\": false\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item search дрель",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test search дрель\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'items count in total').to.eql(1);",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].name, 'result[0]: \"name\" field').to.eql('Аккумуляторная дрель');",
									"    pm.expect(jsonData[0].description, 'result[0]: \"description\" field').to.eql('Аккумуляторная дрель + аккумулятор');",
									"    pm.expect(jsonData[0].available, 'result[0]: \"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/search?text=дРелЬ",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								"search"
							],
							"query": [
								{
									"key": "text",
									"value": "дРелЬ"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item search аккумуляторная available",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test search дрель\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'items count in total').to.eql(1);",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].name, 'result[0]: \"name\" field').to.eql('Аккумуляторная дрель');",
									"    pm.expect(jsonData[0].description, 'result[0]: \"description\" field').to.eql('Аккумуляторная дрель + аккумулятор');",
									"    pm.expect(jsonData[0].available, 'result[0]: \"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/search?text=аккУМУляторная",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								"search"
							],
							"query": [
								{
									"key": "text",
									"value": "аккУМУляторная"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "item update set available",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test update available\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Отвертка');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная отвертка');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"available\": true\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item search отвертка",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test search оТверТ\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'items count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].name, 'result[0]: \"name\" field').to.eql('Отвертка');",
									"    pm.expect(jsonData[0].description, 'result[0]: \"description\" field').to.eql('Аккумуляторная отвертка');",
									"    pm.expect(jsonData[0].available, 'result[0]: \"available\" field').to.true;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/search?text=оТверТ",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								"search"
							],
							"query": [
								{
									"key": "text",
									"value": "оТверТ"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item search empty",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test search оТверТ\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'items count in total').to.eql(0);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/search?text=",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								"search"
							],
							"query": [
								{
									"key": "text",
									"value": ""
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "bookings",
			"item": [
				{
					"name": "item update set unavailable",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test update available\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Отвертка');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная отвертка');",
									"    pm.expect(jsonData.available, '\"available\" field').to.false;",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"available\": false\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking create from user1 to item1 unavailable",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(1, 'd');\r",
									"var end = moment().add(2, 'd');\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 2,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "item update set available",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test update available\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Отвертка');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная отвертка');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"available\": true\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking create failed by wrong userId",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 500\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500, 404]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(1, 'd');\r",
									"var end = moment().add(2, 'd');\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "100",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 2,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking create failed by not found itemId",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 404\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([404]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(1, 'd');\r",
									"var end = moment().add(2, 'd');\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 200,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking create failed by end in past",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(1, 'd');\r",
									"var end = moment().add(-1, 'd');\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 2,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking create failed by end before start",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(2, 'd');\r",
									"var end = moment().add(1, 'd');\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 2,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking create failed by start in past",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(-1, 'd');\r",
									"var end = moment().add(1, 'd');\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 2,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking create from user1 to item2 current",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200,201]);",
									"});",
									"pm.test(\"Test create current booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.start, '\"start\" field').to.eql(pm.environment.get('start'));",
									"    pm.expect(jsonData.end, '\"end\" field').to.eql(pm.environment.get('end'));",
									"    pm.expect(jsonData.status, '\"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData.booker.id, '\"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData.item.id, '\"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData.item.name, '\"item.name\" field').to.eql('Отвертка');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(3, 's');\r",
									"var end = moment().add(4, 's')\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 2,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking set approve by owner current",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test approve current booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.status, '\"status\" field').to.eql('APPROVED');",
									"    pm.expect(jsonData.start, '\"start\" field').to.eql(pm.environment.get('start'));",
									"    pm.expect(jsonData.end, '\"end\" field').to.eql(pm.environment.get('end'));",
									"    pm.expect(jsonData.booker.id, '\"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData.item.id, '\"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData.item.name, '\"item.name\" field').to.eql('Отвертка');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId?approved=true",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"query": [
								{
									"key": "approved",
									"value": "true"
								}
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking create from user1 to item2",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200,201]);",
									"});",
									"pm.test(\"Test create booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.start, '\"start\" field').to.eql(pm.environment.get('start'));",
									"    pm.expect(jsonData.end, '\"end\" field').to.eql(pm.environment.get('end'));",
									"    pm.expect(jsonData.status, '\"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData.booker.id, '\"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData.item.id, '\"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData.item.name, '\"item.name\" field').to.eql('Отвертка');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(1, 'd');\r",
									"var end = moment().add(2, 'd');\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 2,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.start, '\"start\" field').to.eql(pm.environment.get('start'));",
									"    pm.expect(jsonData.end, '\"end\" field').to.eql(pm.environment.get('end'));",
									"    pm.expect(jsonData.status, '\"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData.booker.id, '\"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData.item.id, '\"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData.item.name, '\"item.name\" field').to.eql('Отвертка');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get by owner",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get owner booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.start, '\"start\" field').to.eql(pm.environment.get('start'));",
									"    pm.expect(jsonData.end, '\"end\" field').to.eql(pm.environment.get('end'));",
									"    pm.expect(jsonData.status, '\"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData.booker.id, '\"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData.item.id, '\"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData.item.name, '\"item.name\" field').to.eql('Отвертка');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for wrong user",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 500\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,404]);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "100",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								""
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for wrong owner user",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 500\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,404]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "100",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for user",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all user booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(2);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].start, 'result[0]: \"start\" field').to.eql(pm.environment.get('start'));",
									"    pm.expect(jsonData[0].end, 'result[0]: \"end\" field').to.eql(pm.environment.get('end'));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Отвертка');",
									"",
									"    pm.expect(jsonData[1].id, 'result[1]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[1].status, 'result[1]: \"status\" field').to.eql('APPROVED');",
									"    pm.expect(jsonData[1].booker.id, 'result[1]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[1].item.id, 'result[1]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[1].item.name, 'result[1]: \"item.name\" field').to.eql('Отвертка');",
									"",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for user by ALL state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get user bookings by 'ALL' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(2);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].start, 'result[0]: \"start\" field').to.eql(pm.environment.get('start'));",
									"    pm.expect(jsonData[0].end, 'result[0]: \"end\" field').to.eql(pm.environment.get('end'));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Отвертка');",
									"",
									"    pm.expect(jsonData[1].id, 'result[1]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[1].status, 'result[1]: \"status\" field').to.eql('APPROVED');",
									"    pm.expect(jsonData[1].booker.id, 'result[1]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[1].item.id, 'result[1]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[1].item.name, 'result[1]: \"item.name\" field').to.eql('Отвертка');",
									"",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings?state=ALL",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							],
							"query": [
								{
									"key": "state",
									"value": "ALL"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for user by FUTURE state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get user bookings by 'FUTURE' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(2);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(2);",
									"    pm.expect(new Date(jsonData[0].start), 'result[0]: \"start\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[0].end), 'result[0]: \"end\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Отвертка');",
									"",
									"    pm.expect(jsonData[1].id, 'result[1]: \"id\" field').to.eql(1);",
									"    pm.expect(new Date(jsonData[1].start), 'result[1]: \"start\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[1].end), 'result[1]: \"end\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[1].status, 'result[1]: \"status\" field').to.eql('APPROVED');",
									"    pm.expect(jsonData[1].booker.id, 'result[1]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[1].item.id, 'result[1]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[1].item.name, 'result[1]: \"item.name\" field').to.eql('Отвертка');",
									"",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings?state=FUTURE",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							],
							"query": [
								{
									"key": "state",
									"value": "FUTURE"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for user by wrong state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 500\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});",
									"pm.test(\"Test get user bookings by 'UNSUPPORTED_STATUS' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.error, 'Error message').to.be.eql('Unknown state: UNSUPPORTED_STATUS');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings?state=UNSUPPORTED_STATUS",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							],
							"query": [
								{
									"key": "state",
									"value": "UNSUPPORTED_STATUS"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for owner",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all owner booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(2);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].start, 'result[0]: \"start\" field').to.eql(pm.environment.get('start'));",
									"    pm.expect(jsonData[0].end, 'result[0]: \"end\" field').to.eql(pm.environment.get('end'));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Отвертка');",
									"",
									"    pm.expect(jsonData[1].id, 'result[1]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[1].status, 'result[1]: \"status\" field').to.eql('APPROVED');",
									"    pm.expect(jsonData[1].booker.id, 'result[1]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[1].item.id, 'result[1]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[1].item.name, 'result[1]: \"item.name\" field').to.eql('Отвертка');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for owner by ALL state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get owner bookings by 'ALL' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(2);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].start, 'result[0]: \"start\" field').to.eql(pm.environment.get('start'));",
									"    pm.expect(jsonData[0].end, 'result[0]: \"end\" field').to.eql(pm.environment.get('end'));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Отвертка');",
									"",
									"    pm.expect(jsonData[1].id, 'result[1]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[1].status, 'result[1]: \"status\" field').to.eql('APPROVED');",
									"    pm.expect(jsonData[1].booker.id, 'result[1]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[1].item.id, 'result[1]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[1].item.name, 'result[1]: \"item.name\" field').to.eql('Отвертка');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner?state=ALL",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							],
							"query": [
								{
									"key": "state",
									"value": "ALL"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for owner by FUTURE state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get owner bookings by 'FUTURE' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(2);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(2);",
									"    pm.expect(new Date(jsonData[0].start), 'result[0]: \"start\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[0].end), 'result[0]: \"end\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Отвертка');",
									"",
									"    pm.expect(jsonData[1].id, 'result[1]: \"id\" field').to.eql(1);",
									"    pm.expect(new Date(jsonData[1].start), 'result[1]: \"start\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[1].end), 'result[1]: \"end\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[1].status, 'result[1]: \"status\" field').to.eql('APPROVED');",
									"    pm.expect(jsonData[1].booker.id, 'result[1]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[1].item.id, 'result[1]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[1].item.name, 'result[1]: \"item.name\" field').to.eql('Отвертка');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner?state=FUTURE",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							],
							"query": [
								{
									"key": "state",
									"value": "FUTURE"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for owner by wrong state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 500\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});",
									"pm.test(\"Test get owner bookings by 'UNSUPPORTED_STATUS' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.error, 'Error message').to.be.eql('Unknown state: UNSUPPORTED_STATUS');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner?state=UNSUPPORTED_STATUS",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							],
							"query": [
								{
									"key": "state",
									"value": "UNSUPPORTED_STATUS"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get unkonwn",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 404\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([404]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "1000"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "User Other create",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200,201]);",
									"});",
									"pm.test(\"Test create other user\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(5);",
									"    pm.expect(jsonData.email, '\"email\" field').to.eql('other@other.com');",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('other');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"other\",\n    \"email\": \"other@other.com\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/users",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get from other user",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 404\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([404]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "5",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking change status fail",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 500\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "5",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking change status by booker",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 404\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([404]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId?approved=true",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"query": [
								{
									"key": "approved",
									"value": "true"
								}
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking set approve by owner",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test approve booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.status, '\"status\" field').to.eql('APPROVED');",
									"    pm.expect(jsonData.booker.id, '\"booking.id\" field').to.eql(1);",
									"    pm.expect(jsonData.item.id, '\"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData.item.name, '\"item.name\" field').to.eql('Отвертка');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId?approved=true",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"query": [
								{
									"key": "approved",
									"value": "true"
								}
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking change status after approve",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId?approved=true",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"query": [
								{
									"key": "approved",
									"value": "true"
								}
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking create from user1 to item1 failed",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 404\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([404]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(2, 'd');\r",
									"var end = moment().add(3, 'd');\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 1,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking create from user4 to item1",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200,201]);",
									"});",
									"pm.test(\"Test create booking 3\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(3);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(1, 'd');\r",
									"var end = moment().add(1, 'd').add(1, 'h');\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 1,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking set rejected by owner",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test approve booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(3);",
									"    pm.expect(jsonData.status, '\"status\" field').to.eql('REJECTED');",
									"    pm.expect(jsonData.booker.id, '\"booker.id\" field').to.eql(4);",
									"    pm.expect(jsonData.item.id, '\"item.id\" field').to.eql(1);",
									"    pm.expect(jsonData.item.name, '\"item.name\" field').to.eql('Аккумуляторная дрель');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId?approved=false",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"query": [
								{
									"key": "approved",
									"value": "false"
								}
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "3"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item 2 get by user4 with  bookings",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Item 2 get by user4 with  bookings\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Отвертка');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная отвертка');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"    pm.expect(jsonData.lastBooking, '\"lastBooking\" field').not.null;",
									"    pm.expect(jsonData.lastBooking.id, '\"lastBooking.id\" field').to.eql(1);",
									"    pm.expect(jsonData.lastBooking.bookerId, '\"lastBooking.bookerId\" field').to.eql(1);",
									"    pm.expect(jsonData.nextBooking, '\"nextBooking\" field').not.null;",
									"    pm.expect(jsonData.nextBooking.id, '\"nextBooking.id\" field').to.eql(2);",
									"    pm.expect(jsonData.nextBooking.bookerId, '\"nextBooking.bookerId\" field').to.eql(1);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var time = setTimeout(function(){}, 4000);\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item 2 get by user1 without  bookings",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Item 2 get by user1 without  bookings\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Отвертка');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Аккумуляторная отвертка');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"    pm.expect(jsonData.lastBooking, '\"lastBooking\" field').null;",
									"    pm.expect(jsonData.nextBooking, '\"nextBooking\" field').null;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item get all user 4 with bookings",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all bookings for user (id = 4)\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'items count in total').to.eql(2);",
									"    ",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].name, 'result[0]: \"name\" field').to.eql('Отвертка');",
									"    pm.expect(jsonData[0].description, 'result[0]: \"description\" field').to.eql('Аккумуляторная отвертка');",
									"    pm.expect(jsonData[0].available, 'result[0]: \"available\" field').to.true;",
									"    pm.expect(jsonData[0].lastBooking, 'result[0]: \"lastBooking\" field').not.null;",
									"    pm.expect(jsonData[0].lastBooking.id, 'result[0]: \"lastBooking.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].lastBooking.bookerId, 'result[0]: \"lastBooking.bookerId\" field').to.eql(1);",
									"    pm.expect(jsonData[0].nextBooking, 'result[0]: \"nextBooking\" field').not.null;",
									"    pm.expect(jsonData[0].nextBooking.id, 'result[0]: \"nextBooking.id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].nextBooking.bookerId, 'result[0]: \"nextBooking.bookerId\" field').to.eql(1);",
									"",
									"    pm.expect(jsonData[1].id, 'result[1]: \"id\" field').to.eql(3);",
									"    pm.expect(jsonData[1].name, 'result[1]: \"name\" field').to.eql('Клей Момент');",
									"    pm.expect(jsonData[1].description, 'result[1]: \"description\" field').to.eql('Тюбик суперклея марки Момент');",
									"    pm.expect(jsonData[1].available, 'result[1]: \"available\" field').to.true;",
									"    pm.expect(jsonData[1].lastBooking, 'result[1]: \"lastBooking\" field').is.null;",
									"    pm.expect(jsonData[1].nextBooking, 'result[1]: \"nextBooking\" field').is.null;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking create from user1 to item3 current",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200,201]);",
									"});",
									"pm.test(\"Test create current booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(4);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(3, 's');\r",
									"var end = moment().add(1, 'd')\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 3,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for user by WAITING state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get user bookings by 'WAITING' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(4);",
									"    pm.expect(new Date(jsonData[0].start), 'result[0]: \"start\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[0].end), 'result[0]: \"end\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(3);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Клей Момент');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings?state=WAITING",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							],
							"query": [
								{
									"key": "state",
									"value": "WAITING"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for owner by WAITING state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get owner bookings by 'WAITING' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(4);",
									"    pm.expect(new Date(jsonData[0].start), 'result[0]: \"start\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[0].end), 'result[0]: \"end\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('WAITING');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(3);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Клей Момент');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner?state=WAITING",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							],
							"query": [
								{
									"key": "state",
									"value": "WAITING"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking (id=4) set rejected by owner",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test reject booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(4);",
									"    pm.expect(jsonData.status, '\"status\" field').to.eql('REJECTED');",
									"    pm.expect(jsonData.booker.id, '\"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData.item.id, '\"item.id\" field').to.eql(3);",
									"    pm.expect(jsonData.item.name, '\"item.name\" field').to.eql('Клей Момент');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId?approved=false",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"query": [
								{
									"key": "approved",
									"value": "false"
								}
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "4"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for user by REJECTED state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"",
									"pm.test(\"Test get user bookings by 'REJECTED' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(4);",
									"    pm.expect(new Date(jsonData[0].start), 'result[0]: \"start\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[0].end), 'result[0]: \"end\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('REJECTED');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(3);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Клей Момент');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings?state=REJECTED",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							],
							"query": [
								{
									"key": "state",
									"value": "REJECTED"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for owner by REJECTED state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"",
									"pm.test(\"Test get owner bookings by 'REJECTED' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(4);",
									"    pm.expect(new Date(jsonData[0].start), 'result[0]: \"start\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[0].end), 'result[0]: \"end\" field').to.greaterThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('REJECTED');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(3);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Клей Момент');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner?state=REJECTED",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							],
							"query": [
								{
									"key": "state",
									"value": "REJECTED"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "comments",
			"item": [
				{
					"name": "Item 1 get without comments",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get item 1 without comments\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"    pm.expect(jsonData.comments.length, 'length of \"comments\" field').to.eql(0);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item 2 get without comments",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get item 2 without comments\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"    pm.expect(jsonData.comments.length, 'length of \"comments\" field').to.eql(0);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var time = setTimeout(function(){}, 3000);"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Add comment to item 1 without booking failed",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							},
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"text\": \"Comment for item 1\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId/comment",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId",
								"comment"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Add empty comment failed",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							},
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"text\": \"\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId/comment",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId",
								"comment"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Add comment to item 2 from user1",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test add comment to item 2 from user1\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.text, '\"text\" field').to.eql(\"Add comment from user1\");",
									"    pm.expect(jsonData.authorName, '\"authorName\" field').to.eql(\"updateName\");",
									"    pm.expect(jsonData.created, '\"created\" field').not.null;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							},
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"text\": \"Add comment from user1\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId/comment",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId",
								"comment"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item 2 get by user1 with comments",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get item 2 by user1  with comments\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"    pm.expect(jsonData.lastBooking, '\"lastBooking\" field').null;",
									"    pm.expect(jsonData.nextBooking, '\"nextBooking\" field').null;",
									"    pm.expect(jsonData.comments.length, 'length of \"comments\" field').to.eql(1);",
									"    var comment = jsonData.comments[0];",
									"    pm.expect(comment.id, '\"id\" field').to.eql(1);",
									"    pm.expect(comment.text, '\"text\" field').to.eql(\"Add comment from user1\");",
									"    pm.expect(comment.authorName, '\"authorName\" field').to.eql(\"updateName\");",
									"    pm.expect(comment.created, '\"created\" field').not.null;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Item 2 get  by user4  with comments",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get item2 by user4  with comments\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(2);",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"    pm.expect(jsonData.lastBooking, '\"lastBooking\" field').not.null;",
									"    pm.expect(jsonData.nextBooking, '\"nextBooking\" field').not.null;",
									"    pm.expect(jsonData.comments.length, 'length of \"comments\" field').to.eql(1);",
									"    var comment = jsonData.comments[0];",
									"    pm.expect(comment.id, '\"id\" field').to.eql(1);",
									"    pm.expect(comment.text, '\"text\" field').to.eql(\"Add comment from user1\");",
									"    pm.expect(comment.authorName, '\"authorName\" field').to.eql(\"updateName\");",
									"    pm.expect(comment.created, '\"created\" field').not.null;",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/items/:itemId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking future create from user5 to item1",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200,201]);",
									"});",
									"pm.test(\"Test create future booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(5);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment().add(10, 'd');\r",
									"var end = moment().add(11, 'd')\r",
									"pm.environment.set('start', start.format('YYYY-MM-DDTHH:mm:ss'));\r",
									"pm.environment.set('end', end.format('YYYY-MM-DDTHH:mm:ss'));\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "5",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"itemId\": 1,\n    \"start\": \"{{start}}\",\n    \"end\": \"{{end}}\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/bookings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking set approve by owner future",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test approve future booking\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(5);",
									"    pm.expect(jsonData.status, '\"status\" field').to.eql('APPROVED');",
									"    pm.expect(jsonData.booker.id, '\"booker.id\" field').to.eql(5);",
									"    pm.expect(jsonData.item.id, '\"item.id\" field').to.eql(1);",
									"    pm.expect(jsonData.item.name, '\"item.name\" field').to.eql('Аккумуляторная дрель');",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/:bookingId?approved=true",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								":bookingId"
							],
							"query": [
								{
									"key": "approved",
									"value": "true"
								}
							],
							"variable": [
								{
									"key": "bookingId",
									"value": "5"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Add comment to item 1 from user5 failed by future booking",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							},
							{
								"key": "X-Sharer-User-Id",
								"value": "5",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"text\": \"Add comment from user5\"\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items/:itemId/comment",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items",
								":itemId",
								"comment"
							],
							"variable": [
								{
									"key": "itemId",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for user by CURRENT state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get user bookings by 'CURRENT' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(4);",
									"    pm.expect(new Date(jsonData[0].start), 'result[0]: \"start\" field').to.lte(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[0].end), 'result[0]: \"end\" field').to.gte(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('REJECTED');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(3);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Клей Момент');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings?state=CURRENT",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							],
							"query": [
								{
									"key": "state",
									"value": "CURRENT"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for owner by CURRENT state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get owner bookings by 'CURRENT' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(4);",
									"    pm.expect(new Date(jsonData[0].start), 'result[0]: \"start\" field').to.lte(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[0].end), 'result[0]: \"end\" field').to.gte(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('REJECTED');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(3);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Клей Момент');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner?state=CURRENT",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							],
							"query": [
								{
									"key": "state",
									"value": "CURRENT"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for user by PAST state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get user bookings by 'PAST' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(1);",
									"    pm.expect(new Date(jsonData[0].start), 'result[0]: \"start\" field').to.lessThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[0].end), 'result[0]: \"end\" field').to.lessThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('APPROVED');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Отвертка');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings?state=PAST",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							],
							"query": [
								{
									"key": "state",
									"value": "PAST"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Booking get all for owner by PAST state",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get owner bookings by 'PAST' state\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(1);",
									"    pm.expect(new Date(jsonData[0].start), 'result[0]: \"start\" field').to.lessThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(new Date(jsonData[0].end), 'result[0]: \"end\" field').to.lessThan(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(jsonData[0].status, 'result[0]: \"status\" field').to.eql('APPROVED');",
									"    pm.expect(jsonData[0].booker.id, 'result[0]: \"booker.id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].item.id, 'result[0]: \"item.id\" field').to.eql(2);",
									"    pm.expect(jsonData[0].item.name, 'result[0]: \"item.name\" field').to.eql('Отвертка');",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner?state=PAST",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							],
							"query": [
								{
									"key": "state",
									"value": "PAST"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "item requests",
			"item": [
				{
					"name": "Add item request with wrong user",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 500\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,404]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "99",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"description\": \"Хотел бы воспользоваться щёткой для обуви\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/requests",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests"
							]
						}
					},
					"response": []
				},
				{
					"name": "Add item request with empty description",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([400]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"description\": null\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/requests",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests"
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get own by wrong user id",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 404\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,404]);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "99",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests"
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get own by user id without requests",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get user's item requests\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'item requests count in total').to.eql(0);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests"
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get all without pagination params",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all item requests\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'item requests count in total').to.eql(0);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests/all",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests",
								"all"
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get all with from = 0 & size = 0",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests/all?from=0&size=0",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests",
								"all"
							],
							"query": [
								{
									"key": "from",
									"value": "0"
								},
								{
									"key": "size",
									"value": "0"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get all with from = -1 & size = 20",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests/all?from=-1&size=20",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests",
								"all"
							],
							"query": [
								{
									"key": "from",
									"value": "-1"
								},
								{
									"key": "size",
									"value": "20"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get all with from = 0 & size = -1",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests/all?from=0&size=-1",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests",
								"all"
							],
							"query": [
								{
									"key": "from",
									"value": "0"
								},
								{
									"key": "size",
									"value": "-1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get all with from = 0 & size = 20 when empty",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all item requests\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'item requests count in total').to.eql(0);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests/all?from=0&size=20",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests",
								"all"
							],
							"query": [
								{
									"key": "from",
									"value": "0"
								},
								{
									"key": "size",
									"value": "20"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Add item request",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test create new item request\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql(\"Хотел бы воспользоваться щёткой для обуви\");",
									"    pm.expect(jsonData.created, \"'created' field\").is.not.null;",
									"    ",
									"    var current = pm.environment.get('currentDateTime');",
									"    var created = new Date(jsonData.created);",
									"    var future = new Date(current);",
									"    future.setSeconds(future.getSeconds() + 2);",
									"    pm.expect(created, '\"created\" field').to.gte(new Date(pm.environment.get('currentDateTime')));",
									"    pm.expect(created, '\"created\" field').to.lte(future);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"description\": \"Хотел бы воспользоваться щёткой для обуви\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/requests",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests"
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get own by user id with requests empty items",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get user's item requests\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'item requests count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].description, 'result[0]: \"description\" field').to.eql(\"Хотел бы воспользоваться щёткой для обуви\");",
									"    pm.expect(jsonData[0].created, \"result[0]: 'created' field\").is.not.null;",
									"    pm.expect(jsonData[0].items.length, 'items count in total').to.eql(0);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var time = setTimeout(function(){}, 1000);"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests"
							]
						}
					},
					"response": []
				},
				{
					"name": "Add item 4",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
									"});",
									"pm.test(\"Test create item\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(4);",
									"    pm.expect(jsonData.name, '\"name\" field').to.eql('Щётка для обуви');",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql('Стандартная щётка для обуви');",
									"    pm.expect(jsonData.available, '\"available\" field').to.true;",
									"    pm.expect(jsonData.requestId, '\"requestId\" field').to.eq(1);",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Щётка для обуви\",\n    \"description\": \"Стандартная щётка для обуви\",\n    \"available\": true,\n    \"requestId\": 1\n}"
						},
						"url": {
							"raw": "{{baseUrl}}/items",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"items"
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get own by user id with requests",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get user's item requests\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'item requests count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].description, 'result[0]: \"description\" field').to.eql(\"Хотел бы воспользоваться щёткой для обуви\");",
									"    pm.expect(jsonData[0].created, \"result[0]: 'created' field\").is.not.null;",
									"    var created = new Date(jsonData[0].created);",
									"    pm.expect(created, 'result[0]: \"created\" field1').to.lte(new Date(pm.environment.get('currentDateTime')));",
									"",
									"    pm.expect(jsonData[0].items.length, 'items count in total').to.eql(1);",
									"    pm.expect(jsonData[0].items[0].id, 'result[0]#items[0]: \"id\" field').to.eql(4);",
									"    pm.expect(jsonData[0].items[0].name, 'result[0]#items[0]: \"name\" field').to.eql(\"Щётка для обуви\");",
									"    pm.expect(jsonData[0].items[0].description, 'result[0]#items[0]: \"description\" field').to.eql(\"Стандартная щётка для обуви\");",
									"    pm.expect(jsonData[0].items[0].available, 'result[0]#items[0]: \"available\" field').to.true;",
									"    pm.expect(jsonData[0].items[0].requestId, 'result[0]#items[0]: \"requestId\" field').to.eql(1);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss.sss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests"
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get all with from = 0 & size = 20 for request owner",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all item requests for request owner\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'item requests count in total').to.eql(0);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests/all?from=0&size=20",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests",
								"all"
							],
							"query": [
								{
									"key": "from",
									"value": "0"
								},
								{
									"key": "size",
									"value": "20"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get all with from = 0 & size = 20 for other user",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all item requests for other user\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'item requests count in total').to.eql(1);",
									"",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(1);",
									"    pm.expect(jsonData[0].description, 'result[0]: \"description\" field').to.eql(\"Хотел бы воспользоваться щёткой для обуви\");",
									"    pm.expect(jsonData[0].created, \"result[0]: 'created' field\").is.not.null;",
									"    pm.expect(new Date(jsonData[0].created), 'result[0]: \"created\" field').to.lte(new Date(pm.environment.get('currentDateTime')));",
									"",
									"    pm.expect(jsonData[0].items.length, 'items count in total').to.eql(1);",
									"    pm.expect(jsonData[0].items[0].id, 'result[0]#items[0]: \"id\" field').to.eql(4);",
									"    pm.expect(jsonData[0].items[0].name, 'result[0]#items[0]: \"name\" field').to.eql(\"Щётка для обуви\");",
									"    pm.expect(jsonData[0].items[0].description, 'result[0]#items[0]: \"description\" field').to.eql(\"Стандартная щётка для обуви\");",
									"    pm.expect(jsonData[0].items[0].available, 'result[0]#items[0]: \"available\" field').to.true;",
									"    pm.expect(jsonData[0].items[0].requestId, 'result[0]#items[0]: \"requestId\" field').to.eql(1);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss.sss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests/all?from=0&size=20",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests",
								"all"
							],
							"query": [
								{
									"key": "from",
									"value": "0"
								},
								{
									"key": "size",
									"value": "20"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get by id for wrong user",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 500\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500, 404]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "99",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests/1",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests",
								"1"
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get by wrong id",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 404\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([404]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests/99",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests",
								"99"
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get by id for other user",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get item request get by id for other user\", function () {",
									"    var jsonData = pm.response.json();",
									"",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql(\"Хотел бы воспользоваться щёткой для обуви\");",
									"    pm.expect(jsonData.created, \"'created' field\").is.not.null;",
									"    pm.expect(new Date(jsonData.created), '\"created\" field').to.lte(new Date(pm.environment.get('currentDateTime')));",
									"",
									"    pm.expect(jsonData.items.length, 'items count in total').to.eql(1);",
									"    pm.expect(jsonData.items[0].id, 'items[0]: \"id\" field').to.eql(4);",
									"    pm.expect(jsonData.items[0].name, 'items[0]: \"name\" field').to.eql(\"Щётка для обуви\");",
									"    pm.expect(jsonData.items[0].description, 'items[0]: \"description\" field').to.eql(\"Стандартная щётка для обуви\");",
									"    pm.expect(jsonData.items[0].available, 'items[0]: \"available\" field').to.true;",
									"    pm.expect(jsonData.items[0].requestId, 'items[0]: \"requestId\" field').to.eql(1);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');\r",
									"\r",
									"var start = moment();\r",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss.sss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "4",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests/1",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests",
								"1"
							]
						}
					},
					"response": []
				},
				{
					"name": "Requests get by id",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get item request by id\", function () {",
									"    var jsonData = pm.response.json();",
									"",
									"    pm.expect(jsonData.id, '\"id\" field').to.eql(1);",
									"    pm.expect(jsonData.description, '\"description\" field').to.eql(\"Хотел бы воспользоваться щёткой для обуви\");",
									"    pm.expect(jsonData.created, \"'created' field\").is.not.null;",
									"    pm.expect(new Date(jsonData.created), '\"created\" field').to.lte(new Date(pm.environment.get('currentDateTime')));",
									"",
									"    pm.expect(jsonData.items.length, 'items count in total').to.eql(1);",
									"    pm.expect(jsonData.items[0].id, 'items[0]: \"id\" field').to.eql(4);",
									"    pm.expect(jsonData.items[0].name, 'items[0]: \"name\" field').to.eql(\"Щётка для обуви\");",
									"    pm.expect(jsonData.items[0].description, 'items[0]: \"description\" field').to.eql(\"Стандартная щётка для обуви\");",
									"    pm.expect(jsonData.items[0].available, 'items[0]: \"available\" field').to.true;",
									"    pm.expect(jsonData.items[0].requestId, 'items[0]: \"requestId\" field').to.eql(1);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"var moment = require('moment');",
									"",
									"var start = moment();",
									"pm.environment.set('currentDateTime', start.format('YYYY-MM-DDTHH:mm:ss.sss'));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/requests/1",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"requests",
								"1"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Pagination",
			"item": [
				{
					"name": "Bookings get all with from = 0 & size = 0",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings?from=0&size=0",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							],
							"query": [
								{
									"key": "from",
									"value": "0"
								},
								{
									"key": "size",
									"value": "0"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Bookings owner get all with from = 0 & size = 0",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner?from=0&size=0",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							],
							"query": [
								{
									"key": "from",
									"value": "0"
								},
								{
									"key": "size",
									"value": "0"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Bookings get all with from = -1 & size = 20",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings?from=-1&size=20",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							],
							"query": [
								{
									"key": "from",
									"value": "-1"
								},
								{
									"key": "size",
									"value": "20"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Bookings owner get all with from = -1 & size = 20",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner?from=-1&size=20",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							],
							"query": [
								{
									"key": "from",
									"value": "-1"
								},
								{
									"key": "size",
									"value": "20"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Bookings get all with from = 0 & size = -1",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings?from=0&size=-1",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							],
							"query": [
								{
									"key": "from",
									"value": "0"
								},
								{
									"key": "size",
									"value": "-1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Bookings owner get all with from = 0 & size = -1",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 400\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([500,400]);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner?from=0&size=-1",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							],
							"query": [
								{
									"key": "from",
									"value": "0"
								},
								{
									"key": "size",
									"value": "-1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Bookings get all with from = 2 & size = 2 when all=3",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all bookings\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'bookings count in total').to.eql(1);",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(1);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings?from=2&size=2",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings"
							],
							"query": [
								{
									"key": "from",
									"value": "2"
								},
								{
									"key": "size",
									"value": "2"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Bookings owner get all with from = 1 & size = 1 when all=2",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.expect(pm.response.code).to.be.oneOf([200]);",
									"});",
									"pm.test(\"Test get all owner bookings\", function () {",
									"    var jsonData = pm.response.json();",
									"    pm.expect(jsonData.length, 'owner bookings count in total').to.eql(1);",
									"    pm.expect(jsonData[0].id, 'result[0]: \"id\" field').to.eql(3);",
									"});"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Sharer-User-Id",
								"value": "1",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "*/*",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/bookings/owner?from=1&size=1",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"bookings",
								"owner"
							],
							"query": [
								{
									"key": "from",
									"value": "1"
								},
								{
									"key": "size",
									"value": "1"
								}
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"variable": [
		{
			"key": "baseUrl",
			"value": "http://localhost:8080"
		}
	]
}